<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>springmvc参数传递</title>
		<script src="jquery-3.6.0.min.js"></script>
		<script>
			$(function(){
				/* 
					请求类型:
						1.get  查询
						2.post form表单提交 新增
						3.put  修改
						4.delete 删除操作
					掌握ajax参数传递
					1.简单参数传递
						根据id=1查询数据
						
				 */
				let user = {
					id: 1,
					name: "tomcat",
					age: 18,
					sex: "女"
				}
				let url ="http://localhost:8090/getUserByUser"
				$.get(url,user,function(data){
					console.log(data)
				})
				
				
				
				/* 
					简单参数传递
					let url ="http://localhost:8090/getUserById"
					$.get(url,{id: 1},function(data){
					console.log(data)
				}) */
				
			})
			
		</script>
	</head>
	<body>
		<h1>参数传递问题</h1>
	</body>
</html>
